Remove an unnecessary check
authorMatthias Clasen <mclasen@redhat.com>
Wed, 11 Jan 2017 00:53:08 +0000 (19:53 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 11 Jan 2017 00:56:21 +0000 (19:56 -0500)
Since the demise of theme engines, we can no longer hit
the case of id >= GTK_CSS_PROPERTY_N_PROPERTIES. So don't
check for this in a very frequently called function.

gtk/gtkcssstaticstyle.c

index 1d4940258fa4370ae5b8cd426075745afe18010f..217bb06265739909a83005052849600fd36b3379 100644 (file)
@@ -46,13 +46,6 @@ gtk_css_static_style_get_value (GtkCssStyle *style,
 {
   GtkCssStaticStyle *sstyle = GTK_CSS_STATIC_STYLE (style);
 
-  if (G_UNLIKELY (id >= GTK_CSS_PROPERTY_N_PROPERTIES))
-    {
-      GtkCssStyleProperty *prop = _gtk_css_style_property_lookup_by_id (id);
-
-      return _gtk_css_style_property_get_initial_value (prop);
-    }
-
   return sstyle->values[id];
 }